using System.ComponentModel.DataAnnotations;

namespace tomware.OpenIddict.UI.Identity.Api;

public class ChangePasswordViewModel
{
  [Required]
  [StringLength(100, ErrorMessage = "The {0} must be at least {2} and at max {1} characters long.", MinimumLength = 6)]
  [DataType(DataType.Password)]
  public string CurrentPassword { get; set; }

  [Required]
  [StringLength(100, ErrorMessage = "The {0} must be at least {2} and at max {1} characters long.", MinimumLength = 6)]
  [DataType(DataType.Password)]
  public string NewPassword { get; set; }

  [Required]
  [Compare("NewPassword", ErrorMessage = "The password and confirmation password do not match.")]
  public string ConfirmPassword { get; set; }

  [Required]
  public string UserName { get; set; }
}
